<?php
       	  if($_SESSION['per']==3 ||$_SESSION['per']==2){
					   exit();
				 }
        $xcrud = Xcrud::get_instance();
        $xcrud->table('news_subcategory');
        $xcrud->relation('category','news_category','cat_id','cat_title');
        
    //    $xcrud->relation('subcategory','news_subcategory','sub_id','sub_title');
     //   $xcrud->change_type('password', 'password', 'md5');
        // hide fields
        //$xcrud->fields('avatar,ngaysinh', true);
              // hide columns
        //  $xcrud->columns('password',true);
      
      
      //------- GRIDVIEW MODE ---------
      
        //Hide field in gridview
               
        //Change type to remote image -------
        
        //---------ADD /EDIT MODE----------
       			$xcrud->change_type('keyword','text');
              $xcrud->label(array('sub_title'=>'Tiêu Đề','sub_alias'=>'Alias','category'=>'Category','mota'=>'Description','thutu'=>'Order'));
                 $xcrud->theme('bootstrap');
                 $xcrud->table_name('News Sub Category Manage System');
				 $xcrud->show_primary_ai_column(true);
        //         $xcrud->unset_add();
                 $xcrud->unset_csv();
                $xcrud->unset_print();
     
                 
                 
                 echo $xcrud->render();
            
                //PHAI VALID LAI, CHI CO MOT VAI USER MOI CO QUYEN SUA THONG TIN CUA ADMIN GROUP VA CHINH GROUP CUA MEMBER
                //EMAIL VA  TAI KHOAN CUA USER KHONG THE THAY DOI 

?>
